<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"><html><head><title>DevIL Documentation, iluCrop</title></head><body topmargin="0" bgcolor="white"><font face="verdana"><img src="../images/DevIL.gif"><br></font>
<style type="text/css">
A.color{color: FFFFFF;text-decoration: none;}
</style>



<table width="100%" cols="2" border="0" bgcolor="navy"><tr align="left"><td align="left"><font color="white">DevIL Documentation</font></td><td align="right"><font color="white">
<a class="color" href="iluContrast.html">Previous</a> |
<a class="color" href="index.html">ILU</a> |
<a class="color" href="iluDeleteImage.html">Next</a>
</font></td></tr></table><br/><table><tr><td>&nbsp;</td><td>
<p><h3>iluCrop</h3></p><table><tr><td>&nbsp;</td><td>
<p><font size="-1">iluCrop "crops" the current image to new dimensions. The new image appears the same as the original, but portions of the image are clipped-off, depending on the values of the parameters of these functions. If XOff + Width, YOff + Height or ZOff + Depth is larger than the current image's dimensions, ILU_ILLEGAL_OPERATION is set. If ZOff is minus or equal to one the crop will be done only on 2 dimensions</font></p>
<table><tr><td>&nbsp;</td><td><p><pre><code><b>ILboolean iluCrop(<br/></b>&nbsp;&nbsp;<b>ILuint</b> <i>XOff</i>, <b>ILuint</b> <i>YOff</i>, <b>ILuint</b> <i>ZOff</i>, <b>ILuint</b> <i>Width</i>, <b>ILuint</b> <i>Height</i>, <b>ILuint</b> <i>Depth</i> <b>);</b></code></pre></p></dl></p></td></tr></table>
<br/><p><h4>Parameters</h4><table><tr><td>&nbsp;</td><td><dl><dt><i><font size="-1">XOff</font></i></font></dt><dd><font size="-1">Number of pixels to skip in the x direction.</font></dd> <dt><i><font size="-1">YOff</font></i></font></dt><dd><font size="-1">Number of pixels to skip in the y direction.</font></dd> <dt><i><font size="-1">ZOff</font></i></font></dt><dd><font size="-1">Number of pixels to skip in the z direction.</font></dd> <dt><i><font size="-1">Width</font></i></font></dt><dd><font size="-1">Number of pixels to preserve in the x direction.</font></dd> <dt><i><font size="-1">Height</font></i></font></dt><dd><font size="-1">Number of pixels to preserve in the y direction.</font></dd> <dt><i><font size="-1">Depth</font></i></font></dt><dd><font size="-1">Number of pixels to preserve in the z direction.</font></dd></dl></p></td></tr></table><br/><h4>Errors</h4><table><tr><td>&nbsp;</td><td><dl><dt><a href="../ILU/ILU_ILLEGAL_OPERATION.html"><font size="-1">ILU_ILLEGAL_OPERATION</font></a></dt><dd><font size="-1">There is currently no image bound. Use ilGenImages and ilBindImage before calling this function. XOff + Width, YOff + Height, or ZOff + Depth is greater than the current image's dimensions. </font></dd>
<dt><a href="../ILU/ILU_OUT_OF_MEMORY.html"><font size="-1">ILU_OUT_OF_MEMORY</font></a></dt><dd><font size="-1">Could not allocate memory for the new image data.</font></dd>
</dl></td></tr></table></p>
<h4>See Also</h4><table><tr><td>&nbsp;</td><td><dl><a href="../IL/ilBindImages.html"><font size="-1">ilBindImages</font></a>, 
<a href="../IL/ilGenImages.html"><font size="-1">ilGenImages</font></a>, 
</td></tr></table></p>
</td></tr></table>



<br/></body></html>
